local Timer = _lib("timer")

return pl.class {
	_name = "Splash",
	_init = function (self)
	
		self.text = [[
			Pana
			
			YS 2022 7 march
			
		]]
		
	self.font = _lg.getFont()
	self.w = self.font:getWidth(self.text)
	self.h = self.font:getHeight()
	end,
	
	load = function (self)
		_lw.setFullscreen(true)
		Timer.after(2, function () 
			Game:switch_state ("mainmenu") 
			Game.state:resize(_lg.getDimensions())
			end)
	end,
	
	update = function (self, dt)
		Timer.update(dt)
	end,
	
	resize = function (self, w, h)
	end,
	
	draw = function (self)
		_lg.print(self.text, _lg.getWidth()/2-self.w, _lg.getHeight() - 5 * self.h)
	end,
}
